package org.nanotek.web;

import javax.validation.constraints.NotNull;

import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.NoOp;

public interface Proxy<T> {

	static final Enhancer enhancer = new Enhancer();
	
    @SuppressWarnings("unchecked")
	default T  createProxy(@NotNull Class<T> clazz) {
        enhancer.setSuperclass(clazz);
        enhancer.setCallback(NoOp.INSTANCE);
        return (T) enhancer.create();
   }
    
}
